package com.study.testSpringBoot.mina;

import org.apache.mina.core.filterchain.IoFilter;
import org.apache.mina.core.filterchain.IoFilterChain;
import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.core.write.WriteRequest;
import org.apache.mina.filter.FilterEvent;

public class MyFilter implements IoFilter {

	@Override
	public void init() throws Exception {
		System.out.println("init方法。。。");
	}

	@Override
	public void destroy() throws Exception {
		System.out.println("destroy方法。。。");
	}

	@Override
	public void onPreAdd(IoFilterChain parent, String name, NextFilter nextFilter) throws Exception {
		System.out.println("onPreAdd方法。。。");
	}

	@Override
	public void onPostAdd(IoFilterChain parent, String name, NextFilter nextFilter) throws Exception {
		System.out.println("onPostAdd方法。。。");
	}

	@Override
	public void onPreRemove(IoFilterChain parent, String name, NextFilter nextFilter) throws Exception {
		System.out.println("onPreRemove方法。。。");
	}

	@Override
	public void onPostRemove(IoFilterChain parent, String name, NextFilter nextFilter) throws Exception {
		System.out.println("onPostRemove方法。。。");
	}

	@Override
	public void sessionCreated(NextFilter nextFilter, IoSession session) throws Exception {
		System.out.println("sessionCreated方法。。。");
	}

	@Override
	public void sessionOpened(NextFilter nextFilter, IoSession session) throws Exception {
		System.out.println("sessionOpened方法。。。");
	}

	@Override
	public void sessionClosed(NextFilter nextFilter, IoSession session) throws Exception {
		System.out.println("sessionClosed方法。。。");
	}

	@Override
	public void sessionIdle(NextFilter nextFilter, IoSession session, IdleStatus status) throws Exception {
		System.out.println("sessionIdle方法。。。");
	}

	@Override
	public void exceptionCaught(NextFilter nextFilter, IoSession session, Throwable cause) throws Exception {
		System.out.println("exceptionCaught方法。。。");
	}

	@Override
	public void inputClosed(NextFilter nextFilter, IoSession session) throws Exception {
		System.out.println("inputClosed方法。。。");
	}

	@Override
	public void messageReceived(NextFilter nextFilter, IoSession session, Object message) throws Exception {
		System.out.println("messageReceived方法。。。");
	}

	@Override
	public void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {
		System.out.println("messageSent方法。。。");
	}

	@Override
	public void filterClose(NextFilter nextFilter, IoSession session) throws Exception {
		System.out.println("filterClose方法。。。");
	}

	@Override
	public void filterWrite(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {
		System.out.println("filterWrite方法。。。");
	}

	@Override
	public void event(NextFilter nextFilter, IoSession session, FilterEvent event) throws Exception {
		System.out.println("event方法。。。");
	}

}
